import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:smart_ai_dart/utils/log_utils.dart';

class LearnController extends GetxController {
  final categories = [
    {
      'name': 'programming',
      'icon': Icons.code,
    },
    {
      'name': 'design',
      'icon': Icons.design_services,
    },
    {
      'name': 'marketing',
      'icon': Icons.analytics_outlined,
    },
    {
      'name': 'business',
      'icon': Icons.business,
    },
  ];

  final recommendedCourses = [
    {
      'id': '001',
      'title': 'flutter_course',
      'description': 'flutter_course_desc',
      'coverUrl': 'https://img1.sycdn.imooc.com/1534bd6709be750417920764.jpg',
      'price': 99.99,
      'currency': 'USD',
    },
    {
      'id': '002',
      'title': 'dart_programming',
      'description': 'dart_course_desc',
      'coverUrl':
          'https://i-blog.csdnimg.cn/direct/c433959aff9048af86006c5a36afd8e2.png',
      'price': 79.99,
      'currency': 'USD',
    },
  ];

  void openCourseDetail(String courseId) {
    // TODO: 实现课程详情页面跳转
    Get.toNamed('/course_detail', arguments: {'courseId': courseId});
  }

  @override
  void onReady() {
    super.onReady();
    LogUtils.shared.d('######################');
  }
}
